package com.androwit.engine.mapping.converter.str;

import com.androwit.engine.mapping.Converter;

public class LongConverter implements Converter<Long, String> {

	@Override
	public Long fromConverted(String value) throws Exception {
		if (value == null || value.length() == 0)
			return 0L;
		return Long.parseLong(value);
	}

	@Override
	public String convert(Long value) throws Exception {
		return value.toString();
	}

}
